package com.atguigu.tingshu.order.client;

import com.atguigu.tingshu.model.order.OrderDetail;
import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.order.mapper.OrderDetailMapper;
import com.atguigu.tingshu.order.mapper.OrderInfoMapper;
import com.atguigu.tingshu.order.service.OrderInfoService;
import com.atguigu.tingshu.order.service.impl.OrderInfoServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/***
 * 订单供内部调用的控制层
 */
@RestController
@RequestMapping(value = "/client/order/orderInfo")
public class OrderInfoClientController {

    @Autowired
    private OrderInfoServiceImpl OrderInfoServiceImpl;


    /**
     * 查询订单的详细信息
     * @return
     */
    @GetMapping(value = "/getOrderInfo/{orderNo}")
    public OrderInfo getOrderInfo(@PathVariable(value = "orderNo") String orderNo){
        OrderInfo orderInfo = OrderInfoServiceImpl.getOrderInfo(orderNo);
        return orderInfo;

    }
}
